<?php
include_once('../libs/htdu_core.php');
$exe_mysql = new execute_mysql_query();
@$td = $_POST['tieu_de'];
@$nd1 = $_POST['desc'];
@$nd2 = $_POST['noi_dung'];
$cur_date = date('Y-m-d');
if($td != "")
{
	$val = $exe_mysql->escape_string(array($td, $nd1, $nd2));
	$query = "insert into node values ('','2','1','','$val[0]','$val[1]','$val[2]',curdate())";
	$data = array(
			'result' => (bool)$exe_mysql->execute($query, 0)
	);
	if($data!="")
	{
		echo '<font color="#0000F"><br />Thực hiện thành công! </font>';
	}
	else
	{
		echo '<font color="#FF0000"><br />Thực hiện không thành công. Vui lòng thử lại! </font>';	
	}
}
?>

<link rel="stylesheet" href="../css/text_css_hqk.css" type="text/css" />
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/redmond/jquery-ui.css" type="text/css" />
<script src="../js/jquery-1.10.2.js"></script>
<script src="../js/jquery-ui.js"></script>
<script src="../admin_ckeditor/ckeditor.js"></script>

<div id="form_editor" title="Soan ban tin">
	<form method="post" action="intro-admin.php" enctype="multipart/form-data">
    	<p>Tieu de: <br />
        <input type="text" id="txttde" name="tieu_de" size="50"></p>
        <p>Tom tat noi dung<br />
        <textarea id="txtdesc" name="desc" cols="50" rows="4"></textarea></p>
        <p>File hinh:<input type="file" id="ufile" name="up_file" />
        <p>Noi dung: <br />
        	<textarea id="noidung" name="noi_dung"></textarea>
        	<script>
        		CKEDITOR.replace( 'noidung',{
					enterMode: CKEDITOR.ENTER_BR
					
				});
				
        	</script>
        </p>
        <p><input type="submit" name="sub_mit" value="Save"></p>
    </form>
</div>
